package com.ws.service;

import com.ws.entity.Address;
import com.ws.entity.Menu;
import com.ws.entity.MenuRole;
import com.ws.entity.User;
import com.ws.util.Result;

import javax.servlet.http.HttpServletRequest;

public interface UserService {

    //用户登录
    Result adminLogin(User user, HttpServletRequest request);

    Result getMenuListByRoleId(Long roleId);

    Result getAdminListForPage(int pno, int psize, String username);

    Result getRoleListAll();

    Result adminInsert(User user);

    Result findAdminById(Long id);

    Result adminUpdate(User user);

    Result deleteAdminById(Long id);

    Result getMenuListALl();

    Result updateAdminPassword(User user);

    Result  getUserByName(String username);

    Result insertMenuRole(MenuRole menuRole);

    Result insertMenu(Menu menu);

    Result insertMenuChildren(Long pid, Menu menu);

    Result findMenuById(Long id);

    Result updateMenu(Menu menu);

    Result deleteMenu(Long id);

    Result loginPassword(User user);

    Result getAddressListForPage(int pno, int psize);

    Result insertAddress(Address address);

    Result findAddressById(Long addressId);

    Result updateAddress(Address address);

    Result deleteAddress(Long addressId);

    Result registerUser(User user);
}
